
import React, { Component } from 'react'
import Son from './Son'

export default class Parent extends Component {

    chuanFn=(str)=>{
        console.log("str",str);
    }

  render() {
    return (
        <>
        <h1>父子组件通信</h1>
        <div>Parent</div>
        <hr></hr>
        <Son title="富士康又咋了" onChuan={this.chuanFn}></Son>
      </>
    )
  }
}
